<script setup lang="ts">
import { storeToRefs } from 'pinia'
import { useTestStore } from '@stores/TestStore'
import { useRouter } from 'vue-router'

const ipcHandle = () => window.electron.ipcRenderer.send('ping')

const testStore = useTestStore()
const { count } = storeToRefs(testStore)
const { updateCount } = testStore
function onClick() {
  updateCount()
}
const $router = useRouter()
function onToRoute() {
  $router.push({ name: 'TestPage' })
}
</script>

<template>
  <div class="flex flex-col h-full">
    <div class="flex-shrink-0 h-12">
      <div class="flex flex-row w-full h-full bg-orange-200 items-center">
        <div class="">工时预估小工具</div>
        <div class="ml-auto">基准设置</div>
      </div>
    </div>
    <div class="flex-1 h-0 flex flex-row">
      <div class="flex-shrink-0 w-64 h-full bg-red-200">
        <div class="flex flex-col h-full">
          <div class="flex-shrink-0">
            <AreaTitle>项目分期列表</AreaTitle>
          </div>
          <div class="flex-1 h-0"><PageList></PageList></div>
        </div>
      </div>
      <div class="flex-shrink-0 w-64 h-full bg-green-200">
        <div class="flex flex-col h-full">
          <div class="flex-shrink-0">
            <AreaTitle>界面/公共组件列表</AreaTitle>
          </div>
          <div class="flex-1 h-0"><ViewCard></ViewCard></div>
        </div>
      </div>
      <div class="flex-1 w-0 h-full bg-blue-200">
        <div class="flex flex-col h-full">
          <div class="flex-shrink-0">
            <AreaTitle>区块列表</AreaTitle>
          </div>
          <div class="flex-1 h-0"><AreaCard></AreaCard></div>
        </div>
      </div>
    </div>
  </div>
</template>
